﻿<UserControl x:Class="XamlPhysics.Samples.Restitution"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:physics="clr-namespace:XamlPhysics;assembly=XamlPhysics"
    mc:Ignorable="d"
    d:DesignHeight="768" d:DesignWidth="1024">

    <Canvas>
        <Rectangle Canvas.Left="209" Canvas.Top="126" Width="50" Height="50" Fill="DarkRed">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody>
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="0" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>
        <Rectangle Canvas.Left="309" Canvas.Top="126" Width="50" Height="50" Fill="DarkGoldenrod">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody>
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="0.2" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>
        <Rectangle Canvas.Left="423" Canvas.Top="126" Width="50" Height="50" Fill="DarkBlue">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody>
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="0.4" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>
        <Rectangle Canvas.Left="529" Canvas.Top="126" Width="50" Height="50" Fill="DarkCyan">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody>
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="0.6" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>
        <Rectangle Canvas.Left="629" Canvas.Top="126" Width="50" Height="50" Fill="DarkKhaki">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody>
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="0.8" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>
        <Rectangle Canvas.Left="733" Canvas.Top="126" Width="50" Height="50" Fill="DarkGreen">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody>
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="1" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>

        <Rectangle Canvas.Left="-100" Canvas.Top="768" Width="1240" Height="10" Fill="Black">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody IsStatic="True">
                    <physics:RectangleBody.Geometries>
                        <physics:RectangleGeometry RestitutionCoefficient="0" />
                    </physics:RectangleBody.Geometries>
                </physics:RectangleBody>
            </physics:PhysicalBox.Body>
        </Rectangle>
    </Canvas>
</UserControl>